Programmable logic devices (PLDs) exist as a well-known type of integrated circuit (IC) that may be programmed by a user to perform specified logic functions. There are different types of programmable logic devices, such as programmable logic arrays (PLAs) and complex programmable logic devices (CPLDs). One type of programmable logic device, known as a field programmable gate array (FPGA), is very popular because of a superior combination of capacity, flexibility, time-to-market, and cost.
An FPGA typically includes an array of configurable logic blocks (CLBs) surrounded by a ring of programmable input/output blocks (IOBs). The CLBs and IOBs are interconnected by a programmable interconnect structure. The CLBs, IOBs, and interconnect structure are typically programmed by loading a stream of configuration data (known as a bitstream) into internal configuration memory cells that define how the CLBs, IOBs, and interconnect structure are configured. An FPGA may also include various dedicated logic circuits, such as memories, microprocessors, digital clock managers (DCMs), and input/output (I/O) transceivers.
Notably, an FPGA having embedded processor or controller circuitry is referred to as a system-on-chip (SoC). An SoC is a fully functional product having its electronic circuitry contained on a single chip. An SoC typically includes all the required ancillary hardware components to facilitate operation of the embedded processor or controller circuitry. For example, an SoC for a cellular telephone may include a microprocessor, an encoder, a decoder, a digital signal processor (DSP), random access memory (RAM), read only memory (ROM), and the like.
An embedded processor is conventionally used as a central processing unit configured to sequentially process instructions contained in software program code (i.e., the conventional fetch, read, execute, write cycle). In some cases, however, it is desirable to use the processor as a logic element. For example, it may be desirable to use an embedded processor in an FPGA to implement a state machine. Since a conventional embedded processor is designed with a software-centric view of a system, it does not provide for efficient implementation of logic elements. For example, if a conventional embedded processor is used to implement a state machine, driving the input/output interface of the processor takes a large percentage of the processing time, which deleteriously affects performance.
Accordingly, there exists a need in the art for a method and apparatus for configuring a processor embedded in an integrated circuit for use as a logic element.